package cn.sxgan.random;


import cn.sxgan.entity.PersonInfo;
import cn.sxgan.entity.SysUser;
import lombok.extern.slf4j.Slf4j;


/**
 * @Description: 配合数据库zoey_mock_db, 生成动态数据
 * @Author: sxgan
 * @Date: 2024-10-24 11:29
 * @Version: 1.0
 **/
@Slf4j
public class MockDataUtils {
    
    
    public static SysUser generateUser(Long userId, PersonInfo personInfo) {
        SysUser user = new SysUser();
        user.setUserName(RandomUtils.generateChineseName());
        user.setUserId(userId);
        user.setPhoneNumber(RandomUtils.createPhoneNumber(RandomUtils.OperatorEnum.CHINA_MOBILE));
        user.setPassword("666666");
        user.setEmail(personInfo.getEmail());
        user.setSex(personInfo.getSex().equals("男") ? 1 : 0);
        user.setPersonalSign("这个人什么都没有留下");
        user.setUserType(1);
        return user;
    }
}
